/* 兼容其他平台的样式 */
:root {
  --ykThemeColor: #f65c2d;
  --ykFontColorBlackDark: rgba(0, 0, 0, 0.85);
  --ykFontColorBlackMiddle: rgba(0, 0, 0, 0.65);
  --ykFontColorBlackLight: rgba(0, 0, 0, 0.45);
  --ykBgColor: #f0f2f5;
  --ykBoxShadow: 0 0 0 2px rgba(246, 92, 44, 0.2);
}

/* 外边距 */
.mr10-yk {
  margin-right: 10px;
}

.mt16-yk {
  margin-top: 16px;
}

.mb16-yk {
  margin-bottom: 16px;
}

.mr16-yk {
  margin-right: 16px;
}

/* 内边距 */
.pd24-yk {
  padding: 24px;
}

.pt16-yk {
  padding-top: 16px;
}

.pb16-yk {
  padding-bottom: 16px;
}

/* 背景颜色 */
.bg-white-yk {
  background: #fff;
}

.bg-color-yk {
  background: var(--ykBgColor);
}

/* 按钮 */
.common-btn-yk {
  .ant-btn {
    border-radius: 4px;
  }

  .ant-btn-primary {
    background: var(--ykThemeColor);
    border-color: var(--ykThemeColor);
  }

  .ant-btn:hover,
  .ant-btn:focus {
    color: var(--ykThemeColor);
    border-color: var(--ykThemeColor);
  }

  .ant-btn-primary:active {
    color: #fff;
    background: #cf3f1b;
    border-color: #cf3f1b;
  }

  .ant-btn-primary:hover,
  .ant-btn-primary:focus {
    color: #fff;
    background: #ff8457;
    border-color: #ff8457;
  }
}

/* 表格 */
.common-table-yk {
  .ant-table-thead > tr > th,
  .ant-table-tbody > tr > td,
  .ant-table tfoot > tr > th,
  .ant-table tfoot > tr > td {
    padding-left: 5px;
    padding-right: 5px;
  }

  .ant-table-thead > tr > th {
    font-weight: var(--fontWeightBold);
  }

  .ant-pagination-item {
    border-radius: 4px;
  }

  .ant-pagination-item-active a {
    color: var(--ykThemeColor);
  }

  .ant-pagination-item-active {
    border-color: var(--ykThemeColor);
  }

  .ant-pagination-item:focus-visible a,
  .ant-pagination-item:hover a {
    color: var(--ykThemeColor);
  }

  .ant-pagination-item:focus-visible,
  .ant-pagination-item:hover {
    border-color: var(--ykThemeColor);
  }

  .ant-pagination-prev:focus-visible .ant-pagination-item-link,
  .ant-pagination-next:focus-visible .ant-pagination-item-link,
  .ant-pagination-prev:hover .ant-pagination-item-link,
  .ant-pagination-next:hover .ant-pagination-item-link {
    color: var(--ykThemeColor);
    border-color: var(--ykThemeColor);
  }

  .ant-pagination-disabled .ant-pagination-item-link,
  .ant-pagination-disabled:hover .ant-pagination-item-link,
  .ant-pagination-disabled:focus-visible .ant-pagination-item-link {
    color: rgba(0, 0, 0, 0.25);
    border-color: #d9d9d9;
  }

  .ant-pagination-jump-prev
    .ant-pagination-item-container
    .ant-pagination-item-link-icon,
  .ant-pagination-jump-next
    .ant-pagination-item-container
    .ant-pagination-item-link-icon {
    color: var(--ykThemeColor);
  }

  .ant-pagination-options-quick-jumper input:hover {
    border-color: var(--ykThemeColor);
  }

  .ant-pagination-options-quick-jumper input:focus,
  .ant-pagination-options-quick-jumper input-focused {
    border-color: var(--ykThemeColor);
    box-shadow: var(--ykBoxShadow);
  }
}

/* 下拉选择器 */
.common-select-yk {
  .ant-select-selector {
    border-radius: 4px !important;
    max-height: 60px;
    overflow-y: auto;
  }

  .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input)
    .ant-select-selector {
    border-color: var(--ykThemeColor);
    box-shadow: var(--ykBoxShadow);
  }

  .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
    border-color: var(--ykThemeColor);
  }

  /* 下拉选择器选项 */
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    color: var(--ykThemeColor);
  }

  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background: #fff6f0;
  }
}

/* 输入框 */
.common-input-yk {
  .ant-input,
  .ant-input-number-input-wrap {
    border-radius: 4px;
  }

  .ant-input:hover {
    border-color: var(--ykThemeColor);
  }

  .ant-input:focus,
  .ant-input-focused {
    border-color: var(--ykThemeColor);
    box-shadow: var(--ykBoxShadow);
  }

  /* 带搜索的输入框 */
  .ant-input-search .ant-input:hover, .ant-input-search .ant-input:focus {
    border-color: var(--ykThemeColor);
  }

  .ant-input-search .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
  .ant-input-search .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
    border-left-color: var(--ykThemeColor);
  }
}

/* 日期选择器 */
.common-date-picker-yk {
  .ant-picker {
    width: 100%;
    &:hover {
      border-color: var(--ykThemeColor);
    }
  }

  .ant-picker-focused {
    border-color: var(--ykThemeColor);
    box-shadow: var(--ykBoxShadow);
  }

  .ant-picker-range .ant-picker-active-bar {
    background: none;
  }

  /* 日期选择器面板 */
  .ant-picker-cell-in-view.ant-picker-cell-today
    .ant-picker-cell-inner::before {
    border: 1px solid var(--ykThemeColor);
  }

  .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner,
  .ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner,
  .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {
    background: var(--ykThemeColor);
  }

  .ant-picker-cell-in-view.ant-picker-cell-in-range::before {
    background: #fff6f0;
  }

  .ant-picker-date-panel
    .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start
    .ant-picker-cell-inner::after,
  .ant-picker-date-panel
    .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end
    .ant-picker-cell-inner::after {
    background: #fde0d7;
  }

  .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover::before,
  .ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-hover::before,
  .ant-picker-cell-in-view.ant-picker-cell-range-end.ant-picker-cell-range-hover::before,
  .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single).ant-picker-cell-range-hover-start::before,
  .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single).ant-picker-cell-range-hover-end::before,
  .ant-picker-panel
    > :not(.ant-picker-date-panel)
    .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start::before,
  .ant-picker-panel
    > :not(.ant-picker-date-panel)
    .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end::before {
    background: #fde0d7;
  }

  .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before,
  .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before {
    background: #fff6f0;
  }

  .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end)::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-end:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end)::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start-single::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-end-near-hover::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-start-near-hover::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-end-single::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-in-range)::after {
    border-top: 1px dashed #faa88e;
    border-bottom: 1px dashed #faa88e;
  }

  tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover:first-child::after,
  tr
    > .ant-picker-cell-in-view.ant-picker-cell-range-hover-end:first-child::after,
  .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start.ant-picker-cell-range-hover-edge-start-near-range::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover-edge-start-near-range)::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-start::after {
    border-left: 1px dashed #faa88e;
  }

  tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover:last-child::after,
  tr
    > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::after,
  .ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-edge-end.ant-picker-cell-range-hover-edge-end-near-range::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover-edge-end-near-range)::after,
  .ant-picker-cell-in-view.ant-picker-cell-range-hover-end::after {
    border-right: 1px dashed #faa88e;
  }
}

/* loading */
.common-loading-yk {
  .ant-spin-dot-item {
    background-color: var(--ykThemeColor);
  }
}

/* modal */
.common-modal-yk {
  .ant-modal-content {
    border-radius: 4px;
    .ant-modal-confirm-btns {
      .ant-btn-primary {
        background: var(--ykThemeColor);
        border-color: var(--ykThemeColor);
      }
    }
  }
}

/* radio */
.common-radio-yk {
  .ant-radio-button-wrapper:hover {
    color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked {
    border-color: var(--ykThemeColor);
    color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
    color: var(--ykThemeColor);
    border-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not([class*=' ant-radio-button-wrapper-disabled']).ant-radio-button-wrapper:first-child {
    border-right-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {
    border-left-color: var(--ykThemeColor);
    background-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover {
    color: var(--ykThemeColor);
    border-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active {
    border-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child {
    border-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover::before {
    background-color: var(--ykThemeColor);
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
    box-shadow: var(--ykBoxShadow);
  }
}
